import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    activeName: ''
  },
  mutations: {
    toSetActiveName(state, name) {
      state.activeName = name
    }
  },
  actions: {
    togetActiveName(context, name) {
      console.log(name)
      context.commit('toSetActiveName', name)
    }
  },
  modules: {
  }
})
